from sqlalchemy import Integer, Column, String, DateTime

from server.config.database import Base


class ResourceInfo(Base):
    """
    数据资源表
    """

    __tablename__ = 't_resource_info'

    id = Column(Integer, primary_key=True, autoincrement=True, comment='主键ID')
    resource_name = Column(String(128), default=None, comment='资源名称')
    resource_type = Column(String(16), comment='资源大类(5：文件系统 6：数据库)')
    database_schema = Column('database_name', String(128), default=None, comment='数据库schema')
    system_name = Column(String(128), default=None, comment='业务系统名称')
    data_owner = Column(String(128), default=None, comment='数据所有者')
    data_manager = Column(String(128), default=None, comment='数据管理者')
    create_time = Column(DateTime, default=None, comment='创建时间')
    update_time = Column(DateTime, default=None, comment='更新时间')